/*
 * Copyright 2007 National Bioinformatics Network
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package dgbgui.gui.widgets.visual;

import java.awt.geom.Point2D;

public class QueryWidgetState implements Cloneable {
    
    public QueryWidgetState(Point2D position, boolean definitionExpanded, boolean resultExpanded) {
        m_position = position;
        m_definitionExpanded = definitionExpanded;
        m_resultExpanded = resultExpanded;
    }
    


    public boolean isDefinitionExpanded() {
        return m_definitionExpanded;
    }
    public void setDefinitionExpanded(boolean expanded) {
        m_definitionExpanded = expanded;
    }
    public Point2D getPosition() {
        return m_position;
    }
    public void setPosition(Point2D position) {
        m_position = position;
    }
    public boolean isResultExpanded() {
        return m_resultExpanded;
    }
    public void setResultExpanded(boolean expanded) {
        m_resultExpanded = expanded;
    }

    
    public Object clone() {
        Object o = null;
        try {
            o = super.clone();
        } catch (CloneNotSupportedException e) {
            System.err.println("MyObject can't clone");    
        }
        return o;
    }
    
    boolean m_definitionExpanded = true;
    boolean m_resultExpanded = true;
    Point2D m_position = new Point2D.Double(0,0);

    
}
